package com.sww.pj.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface RoleMenuDao {
	int insertObjects(Integer roleId,Integer[] menuIds);
	int deleteObjectsByRoleId(Integer roleId);
	
	@Select("select menus_id from sww_roles_menus where roles_id=#{id}")
	List<Integer> findMenuIdsByRoleId(Integer id);
	List<Integer> findMenuIdsByRoleIds(List<Integer> roleIds);
	
	@Delete("delete from sww_roles_menus where menus_id=#{menuId}")
	int deleteObjectsByMenuId(Integer menuId);
	
}
